{block name="style"}
<style xmlns="http://www.w3.org/1999/html">
    .keys-container .input-group-addon {
        top: 0;
        right: 0;
        color: #eee;
        width: 25px;
        padding: 7px;
        position: absolute;
        margin-top: -1px;
        text-align: center;
        background: #393D49
    }

    .keys-container [data-tips-image] {
        width: 112px;
        height: auto
    }

    .keys-container .layui-card {
        width: 580px;
        height: 578px;
        position: absolute;
        border: 1px solid #ccc
    }
</style>
{/block}

<form action="{:request()->url()}" data-auto="true" method="post" class='layui-form layui-card table-block'
      autocomplete="off">

    <div class="layui-card-body">
   

        <div class="layui-form-item">
            <label class="layui-form-label">家长手机</label>
            <div class="layui-input-block">
                <input name="parents_mobile" value='{$vo.parents_mobile|default=""}' required placeholder="请输入家长手机"
                       class="layui-input">
                <p class="help-block">必填，请输入家长手机</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">学员姓名</label>
            <div class="layui-input-block">
                <input name="user_name" value='{$vo.user_name|default=""}' required placeholder="请输入学员姓名"
                       class="layui-input">
                <p class="help-block">必填，请输入学员姓名</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">学员年龄</label>
            <div class="layui-input-block">
                <input name="user_age" value='{$vo.user_age|default=""}' required placeholder="请输入学员年龄"
                       class="layui-input">
                <p class="help-block">必填，请输入学员年龄</p>
            </div>
        </div>

 
            <label class="layui-form-label">选择科目</label>
            <div class="layui-input-block">
                {foreach $vo['menu_list'] as $k=>$v}
                <div style="font-size: 12px;line-height: 26px;color: #666;">{$v.title}</div>
                {foreach $v.sub as $v1}
                {if isset($vo.menu_keys) and in_array($v1.id,$vo.menu_keys)}
                <input type="checkbox" name="menu_keys[]" value="{$v1.id}" title="{$v1.title}" lay-skin="primary"
                       checked>
                {else}
                <input type="checkbox" name="menu_keys[]" value="{$v1.id}" title="{$v1.title}" lay-skin="primary">
                {/if}
                {/foreach}
                <br/>
                {/foreach}
            </div>
        </div>
      
    </div>
    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type="submit">保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

</form>

{block name='script'}
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script>

    layui.form.render();

    var table_data = JSON.parse('{$vo.price_list|raw}');
    var table;
    layui.use('table', function () {
        table = layui.table;
        //展示已知数据
        table.render({
            elem: '#demo',
            data: table_data
        });

    });


</script>
{/block}
